class ChatMsg {
  int id;
  String msgType;
  String message;
  String fromId;
  String fromName;
  String fromImage;
  String sendTo;
  var createAt;
  int status;
  int unReadNum;
  String msgTag;

  ChatMsg(
      {this.id,
      this.msgType,
      this.message,
      this.fromId,
      this.fromName,
      this.fromImage,
      this.sendTo,
      this.createAt,
      this.status,
      this.unReadNum,
      this.msgTag,
      });

  ChatMsg.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    msgType = json['msgType'];
    message = json['message'];
    fromId = json['fromId'];
    fromName = json['fromName'];
    fromImage = json['fromImage'];
    sendTo = json['sendTo'];
    createAt = json['createAt'];
    status = json['status'];
    unReadNum = json['unReadNum'];
    msgTag = json['msgTag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['msgType'] = this.msgType;
    data['message'] = this.message;
    data['fromId'] = this.fromId;
    data['fromName'] = this.fromName;
    data['fromImage'] = this.fromImage;
    data['sendTo'] = this.sendTo;
    data['createAt'] = this.createAt;
    data['status'] = this.status;
    data['unReadNum'] = this.unReadNum;
    data['msgTag'] = this.msgTag;
    return data;
  }
}
